Skip to content

feat: improved embed navigation APIs - #9866

Closed
AdityaHegde wants to merge 6 commits into
mainfrom
feat/improved-embed-navigation-apis
Closed

AdityaHegde wants to merge 6 commits into
mainfrom
feat/improved-embed-navigation-apis

Conversation

@AdityaHegde

@AdityaHegde AdityaHegde commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

We have events for navigation from one dashboard to other. This adds events to control navigation,

  • Add navigateBack/navigateForward to take the user back and forward within the iframe.
  • Add navigateToDashboard to take the user to a specific dashboard.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@AdityaHegde
AdityaHegde marked this pull request as ready for review September 8, 2026 06:34
@AdityaHegde AdityaHegde added Release Notes Type:Feature New feature request Size:S Small change: under 100 lines labels Sep 8, 2026
@nishantmonu51

Copy link
Copy Markdown
Collaborator

Two navigation edge cases:

  • Omitting state skips session cleanup, so returning to a previously filtered explore restores old filters despite the documented default-state behavior. The existing test passes state: ""; the equivalent test with state omitted fails. Could we align the behavior/docs and cover canvas last-visited state too?
  • history.back()/forward() traverse the tab's joint history, including host-page entries, so iframe-only navigation and a no-op at the initial dashboard aren't guaranteed. Could we track embed navigation boundaries and test initial-dashboard back plus interleaved host navigation? This concern follows the HTML history semantics; I haven't verified it end to end.

@AdityaHegde

Copy link
Copy Markdown
Collaborator Author
  1. Fixed to also clear when state is not provided. Also updated to clear canvas state as well.
  2. Moved to an in memory history. Has its drawbacks but wont change the navigation of the parent.

@AdityaHegde

Copy link
Copy Markdown
Collaborator Author

Reflecting more on this, asking the users to call window.history.back() is the best solution IMO. This will avoid unnecessary complex code to track urls. This can lead to more issues vs using browser's APIs

@nishantmonu51

Copy link
Copy Markdown
Collaborator

agreed..

@AdityaHegde

Copy link
Copy Markdown
Collaborator Author

Closing in favour of just calling window.history.back() will raise a new PR with updates to docs once we get a confirmation from client.

@AdityaHegde
AdityaHegde deleted the feat/improved-embed-navigation-apis branch September 16, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release Notes Size:S Small change: under 100 lines Type:Feature New feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants